#include "Shape.h"
//---------------------------------------------------------------------------------------------//
Shape::Shape()
{
	vertices = new D3DVertex[4];
	
	vertices[0].setVertex(-50,50,0,0xff0000ff);
	vertices[1].setVertex(50,50,0,0xff0000ff);
	vertices[2].setVertex(-50,-50,0,0xff0000ff);
	vertices[3].setVertex(50,-50,0,0xff0000ff);


	rotation = 0;
}
//---------------------------------------------------------------------------------------------//
void Shape::Draw(Graphics& g)
{
	g.SetTexture(NULL);
	rotation += 0.1f;
	g.SetMatrixMode(WORLD_MATRIX);
	g.LoadIdentity();
	g.Translate(-300,0,0);
	//g.Scale(2,2);
	g.RotateZ(rotation);
	g.DrawElements(4, vertices, TRIANGLESTRIP );

}